package com.timu.core;

import com.timu.bean.ServiceResult;
import com.timu.common.EaipServiceMeta;
import com.timu.common.EaipServiceParam;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @描述:
 * @Author: zhangh
 * @Time: 2021/1/26 15:30
 **/
@Service
public class EaipServiceInvoker implements ServiceInvoker {
    @Override
    public ServiceResult doService(EaipServiceMeta eaipServiceMeta, EaipServiceParam eaipServiceParam, ServiceResultParser parser) {
        /**
         *  Message<? extends Serializable> response=null;
         *  response=ESBClient.request(eaipServiceParam.getMessage(), HashMap.class,null);
         *  Map<String,Object> respMap=(Map)response.getMessageBody();
         */

        //模拟获取到了业务对象
        Map<String,Object> respMap=null;
         return  parser.parseResult(respMap);

    }
}
